package com.lucifer.cloud.boot.blog.nl2sql.vector;

import org.springframework.ai.document.Document;
import org.springframework.ai.vectorstore.SearchRequest;
import org.springframework.ai.vectorstore.filter.Filter;

import java.util.List;

/**
 * @author lucifer
 * @date 2025/3/14 13:52
 */
public interface BaseVectorStore {

    void add(List<Document> documents);

    void delete(List<String> idList);

    List<Document> similaritySearch(String query);

    List<Document> similaritySearch(SearchRequest request);

    List<Document> searchByTag(String query,String tag,Integer topK);

    List<Document> searchByTag(String query, Filter.Expression expression, Integer topK);

    List<Document> searchByTagQueryNull(Filter.Expression expression, Integer topK);

    List<Document> searchByExpression(String query, Filter.Expression expression);
}
